package com.ruoyi.product.service.impl;

import java.util.List;

import com.ruoyi.product.vo.BrandCategoryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.product.mapper.BrandCategoryMapper;
import com.ruoyi.product.domain.BrandCategory;
import com.ruoyi.product.service.IBrandCategoryService;

/**
 * 品牌分类关联Service业务层处理
 * 
 * @author 汤小洋
 * @date 2024-11-07
 */
@Service
public class BrandCategoryServiceImpl implements IBrandCategoryService 
{
    @Autowired
    private BrandCategoryMapper brandCategoryMapper;

    /**
     * 查询品牌分类关联
     * 
     * @param brandId 品牌分类关联主键
     * @return 品牌分类关联
     */
    @Override
    public BrandCategory selectBrandCategoryByBrandId(Long brandId)
    {
        return brandCategoryMapper.selectBrandCategoryByBrandId(brandId);
    }

    /**
     * 查询品牌分类关联列表
     * 
     * @param brandCategory 品牌分类关联
     * @return 品牌分类关联
     */
    @Override
    public List<BrandCategoryVo> selectBrandCategoryList(BrandCategory brandCategory)
    {
        return brandCategoryMapper.selectBrandCategoryList(brandCategory);
    }

    /**
     * 新增品牌分类关联
     * 
     * @param brandCategory 品牌分类关联
     * @return 结果
     */
    @Override
    public int insertBrandCategory(BrandCategory brandCategory)
    {
        return brandCategoryMapper.insertBrandCategory(brandCategory);
    }

    /**
     * 修改品牌分类关联
     * 
     * @param brandCategory 品牌分类关联
     * @return 结果
     */
    @Override
    public int updateBrandCategory(BrandCategory brandCategory)
    {
        return brandCategoryMapper.updateBrandCategory(brandCategory);
    }

    /**
     * 批量删除品牌分类关联
     * 
     * @param brandIds 需要删除的品牌分类关联主键
     * @return 结果
     */
    @Override
    public int deleteBrandCategoryByBrandIds(Long[] brandIds)
    {
        return brandCategoryMapper.deleteBrandCategoryByBrandIds(brandIds);
    }

    /**
     * 删除品牌分类关联信息
     * 
     * @param brandId 品牌分类关联主键
     * @return 结果
     */
    @Override
    public int deleteBrandCategoryByBrandId(Long brandId)
    {
        return brandCategoryMapper.deleteBrandCategoryByBrandId(brandId);
    }

    @Override
    public int deleteBrandCategory(BrandCategoryVo brandCategoryVo) {
        return brandCategoryMapper.deleteBrandCategory(brandCategoryVo);
    }
}
